﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HomeWork11_Order
{
    class Program
    {
        static public OrderService orderService=new OrderService();
        static public Order order1 = new Order();
        static public Order order2 = new Order();
        static void Init()
        {
            using (var context = new OrderContext())
            {
                context.Products.Add(new Product { ProductName="apple", ProductPrice = 5 });
                context.Products.Add(new Product { ProductName = "pear", ProductPrice = 6 });
                context.Products.Add(new Product { ProductName = "peach", ProductPrice = 7 });
                
                context.SaveChanges();
            }
        }
        static void Main(string[] args)
        {
            Init();
            orderService.AddOrder();
            orderService.QueryOrder();
            orderService.ModifyOrder();
            orderService.DeleteOrder();

        }
    }
}
